%! TEX root = ./manuscript.tex

%\section[]{}
An environment can change the behavior or attitudes of a person via two
complementary yet different processes: (1) via exposure to a physical,
objective milieu that requires no understanding on the part of the person to
have its causal effect (e.g., new precinct boundaries change vote turnout,
regardless of whether residents know anything about the new lines
\citep{amos2017, hayes2009, hayes2011}), and (2) via the creation of a mental
image or map of the environment in the mind of the person before an attitude or
behavior (like fear or discrimination) can be produced. This could explain why
administratively recorded demographic change heralds conflict and segregation
in some places but not in others \citep{meer2014ethnic, portes2011diversity,
cho2011environmental}, and why some researchers find that people who live in
diverse objective environments tend to display less social capital and social
trust than people who live in homogeneous environments
\citep{alesina2000participation, putnam2007pluribus, stolle2008does,
dinesen2015ethnic} while other scholars find no such relationship
\citep{abascal2015love, savelkoul2015does, gijsberts2012hunkering}.

The two causal mechanisms could be operating separately: in some places
objective diversity might prevent social cohesion and public goods provision,
and in other places perceptions of this diversity are at odds with the
objective context and thus mute the effects assessed using objective  data such
as that from the Census \citep{habyarimana2007does, Dinesen2020}. We propose
that the mechanism by which diversity may reduce social cohesion depends on
individual perceptions as well as Census measures of diversity in a place.
Efforts to measure contextual effects tend to show that people's definitions of
relevant environments vary, and even when they see a map of local census units,
few report exactly what the census has measured \citep{koopmans_schaeffer:16,
lameris2018perceptions, wong2012bringing}. This misfit between what people see
and where they live justifies the present study, in which we establish that
perceptions can operate independently of objective context in predicting social
cohesion.

Furthermore, the effects of perceptions  compound. Why might \emph{perceived}
diversity matter for social cohesion? Our theoretical account builds on the
idea of conditional cooperation. If people \emph{believe}  they do not share
preferences, norms, or values with their diverse neighbors, perceptions of
diversity can diminish norms of reciprocity, civic engagement, cooperation, and
the sharing of social goods without any change in objective
diversity.\footnote{And, once one sees that a norm is being violated, one is
more likely to start ignoring other norms \citep{keizer2008spreading}.} If an
individual thinks \emph{They} will not work to benefit \emph{Us}, why should
she contribute to a common good and let \emph{Them} free-ride? This mechanism
linking perceptions and cohesion should operate across people living in the
same places: differences in tax compliance or feelings of trust between two
people living in the same city or block can be explained by differences in
perceptions of diversity, even as they cannot be explained by differences in
geography.

The idea that environmental or contextual effects operate via perceptions is
not new. \textcite{lippmann1922public} explains how people react as much, if
not more, to ``pseudoenvironments'' as to real environments. Yet, the study of
``context effects'' has largely focused on the objective pathway, even while
many of the mechanisms implied by the theories involve subjective responses
like fear, inspired by feelings of ``power threat'' \citep{blalock1967toward}.
The administrative data based approach has been sensible because measuring
pseudoenvironments has been very difficult, and disentangling the subjective
from the objective environment even more challenging. This paper builds on
previous work about perceptions and their effects on intergroup attitudes
\citep{semyonov2004population, herda2010many, lameris2018perceptions,
hippwickes, chan2023}, and it uses a research design that enables us to hold
constant objective context within pairs of survey respondents so as to isolate
differences in social cohesion arising from perceptions. This attempt to
separate the perceptions-to-social cohesion link from the experience-to-social
cohesion link does not follow common social science research design practices:
we are not trying to estimate a causal effect or test a hypothesis about causal
differences; we are not holding constant objective context because we imagine
that perceptions are exogenous to either objective context or the background
characteristics of people.\footnote{In this paper, we do not provide a study of
predictors of perceptions \citep{herda2010many, herda2013}. While demographic
and socioeconomic factors are related -- much like for other measures of
knowledge -- we also know other psychological factors are at work
\citep{wongpoq, landy2018, guayquirks}.} Rather, we use some of the tools of causal
inference --- such as non-bipartite pair matching --- to \emph{describe} the
partial correlations between perceptions and outcomes where objective contexts
have been held constant. As we will explain below and should be clear from the
preceding paragraphs, experience of a place and its mental representation are
bound together, neither is exogenous of each other, and we do not claim to have
broken causal links in this paper. Instead, we create a careful research design
that clarifies \emph{one way} by which place matters for social cohesion. We
explain more below.

To learn whether the two-path theory of contextual effects explains individual
attitudes, we need to (1) measure the mental images that people construct of
the groups in a given place as well as the boundaries that people imagine
around their personally relevant places using maps and (2) describe the
association between pseudoenvironments and outcomes in ways that are isolated
from the effects of objective environments. We know that perceptions and
understandings of locales lead people to choose to arrive at, stay in, and
leave places. So, simple comparisons of people who perceive their locales
differently will not merely tell us about the impact of pseudoenvironments, but
also about the impact of objective environments. And, of course, we cannot
compare the same person with herself after changing perceptions in her mind.

We tackle the first challenge by using measurement tools developed by
\textcite{Wong2018} for capturing the mental images individuals create of their
surroundings:  we ask people to draw their ``local community'' on a map as a
way to measure the \emph{boundaries} of a geographic pseudoenvironment. We use
these hand-drawn maps to determine the relationship between ethnic diversity
and social cohesion, free from the concerns raised by the Modifiable Areal Unit
Problem \citep{bhat2004mixed}. We then ask respondents to report on how they
see the characteristics of the people in that community (i.e., measure the
\emph{content} of those pseudoenvironments); the boundaries and content
together are our solution for measuring perceived context. This use of maps
builds on the work on mental mapping pioneered by \textcite{lynch1973image}
that has continued across the social sciences \citep{grannis1998importance,
coulton2001mapping, wong2012bringing, mccartan2024}.

We confront the challenge of isolating the perceptions-to-outcome relationship
from the effect of objective context by finding pairs of survey respondents who
are identical (or nearly so) in objective context of their neighborhoods and
making comparisons of social cohesion only within those pairs. In our
descriptive analysis, we are not isolating perceptions from the causes of it,
we only isolate it from objective context, we allow perceptions to be caused by
many factors, and we engage below with some alternative explanations for our
descriptive results. We present four different research designs with ever more
closely matched respondents: all show the same results. Our results show that
perceptions can differ greatly within pair --- even for people living in places
that are virtually the same in terms of objective ethnic diversity --- and that
these differences in perceptions predict attitudes about the perceived social
cohesion of places.\footnote{Furthermore, we show below that misperceptions are
not proxy measures for ethnocentrism; we find no evidence that misperceptions
are simply moderating the effect of prejudice on social cohesion, for example.}

\section{Data and Measures: The Mapping Local Communities Canada Study}

% supp_desc_new.Rout
%> ## Total number of respondents
%> nrow(big_wrkdat_thin)
%[1] 7811

We use online survey responses from 7811 English speaking Canadians who
answered the Mapping Local Communities Canada Study (MLCC) in April--July 2012.
A non-partisan electoral education initiative sponsored by the Canadian
Broadcasting Corporation called Vote Compass provided the sampling frame (see
Appendix for more details).  The respondents in our convenience sample were
better educated, wealthier, and more likely to be informed about politics, and
more comfortable using technology than the average Canadian. Our aim is to
provide a focused assessment of the relationship between perceptions of place
and attitudes about social cohesion, and our results are likely
\emph{conservative} given that misperceptions would be greater for the Canadian
population as a whole; better educated, wealthier, and more politically
informed survey respondents are likely to differ less from one another in
regards their perceptions than survey respondents representing all of English
speaking Canadian society \citep{dellicarpini, nadeau1993}.

Canada suits our study because of its immigrant history, rapidity of
demographic change, and ethnic heterogeneity across the nation. ``Visible
minorities,'' the Canadian Census term for non-white and non-Aboriginal
Canadians, grew from less than 1 percent of the population in 1971 to about 16
percent in the 2006 Census. The effect of this diversity is noticeable in its
biggest cities. For example, by the 2016 Census, visible minorities made up
more than 1 in 5 Canadians and both Toronto and Vancouver were
majority-minority. Furthermore, Canada has an official policy of
multiculturalism, and diversity is a salient political issue
\citep{bouchard2008building}. Because we care about theories of threat posed by
minorities and social cohesion in the context of ethnic diversity, our main
analyses in this paper focus on majority group members (i.e., non-visible
minorities and non-Aboriginals).

\subsection{Outcomes: Social Cohesion and Collective Efficacy}\label{sec:outcome}

Respondents were asked to agree or disagree (strongly or not) with the following
three statements about the people in the local community they drew:

%\begin{singlespacing}
\begin{enumerate}[noitemsep]
\item  People around here are willing to help others in their community.
\item  People in this community generally don't get along with each other.
\item  People in this community do not share the same values.
\end{enumerate}

\noindent We created an additive index of the three items (coded in the
same direction) for a \emph{Social Cohesion Index}.
%\end{singlespacing}

Respondents were also asked how likely or unlikely (very or not) the following
scenarios would be, given the people in their self-defined local community:

%\begin{singlespacing}
\begin{enumerate}[noitemsep]

\item If some children were painting graffiti on a local building or house, how
	likely is it that people in your community would do something about it?

\item Suppose that because of budget cuts the library closest to your home was
	going to be closed down by the city. How likely is it that community
	residents would organize to try to do something to keep the library
	open?

\end{enumerate}

%\end{singlespacing}
%\vspace{-1em}
\noindent We created an additive \emph{Collective Efficacy Index} from these 2
items, which represent an action-oriented aspect of social
cohesion.\footnote{\textcite{sampson1997neighborhoods} use this concept of
    Collective Efficacy in explaining disparate outcomes of otherwise similarly
poor neighborhoods in Chicago.}

These indices capture what respondents think \emph{others} believe or would do
under certain circumstances. These measures fit well with the literature on
conditional cooperation, which emphasizes that individuals rely on their
predictions of how others will behave to decide their own actions.
%As a result,
%perceptions of social capital and collective efficacy may be more important than
%actual levels of PTA membership, local philanthropy, and the like in regards to
%measuring predictions of social cohesion.

\subsection{What do the Census and People See?}
\subsubsection{Measures of Objective Context}

% supp_desc_new.Rout
% > ## Total number of DAs
%> length(unique(big_wrkdat_thin$dauid))
%[1] 6369

For our objective context measures, we use data from the 2006 Canadian Census
for levels of visible minority population and used both the 2006 and the 2016
Canadian Census to create a measure of change in visible minority
population.\footnote{We originally had intended to use both 2011 and 2006
	census data to look at contemporaneous and changes in diversity.
	However, in 2011, the long-form of the Census --- which is where
	Canadians are asked about their ethnicity and race --- became voluntary
	in the newly renamed National Household Survey
	\citep{thompson2010politics}. The response rate dropped 25 percentage
points. The Census summaries for small geographic units (such as dissemination
areas) were made particularly imprecise and/or are missing given this change in
the Census \citep{Sheikh2013, grant2015damage}.}  We created an index of the
percentage of visible minorities for Census dissemination areas (DA); they are
the smallest Census unit for which all information is
disseminated.\footnote{The MLCC contains 6369 DAs.} We followed the Statistics
Canada definition of ``visible minority'' (which includes ``persons who are
non-Caucasian in race or non-white in colour and who do not report being
Aboriginal'').\footnote{See Appendix for Census question wording.} In 2006, 50
percent of Canada's roughly 55,000 DAs contained less than 6 percent visible
minorities.\footnote{As a point of comparison, in Canada overall, visible
minorities made up 16 percent of the population.}

\subsubsection{Measures of Subjective Context}\label{sec:measure_maps}

To create a measure of personally relevant places that operationalizes context
as pseudoenvironments, respondents see an online map centered on the postal code
where they live and then draw their ``local community'' (For details about
the map-drawing measure --- including its validity and reliability --- see
\textcite{Wong2018}.) Figure~\ref{fig:torontomaps} shows an example of 50 such
maps drawn by people living in the Greater Toronto Area (GTA) overlaid on each
other and on a Google Map of the GTA. Each map was unique.

\begin{figure}[!htb]
  \begin{center}
    \includegraphics[width=.99\linewidth]{TorontoAllCommunities1_cropped.pdf}
  \end{center}
  \caption{A random sample of 50 ``local community'' maps drawn by residents of Toronto in the MLCC}
    \label{fig:torontomaps}
\end{figure}

After respondents drew their ``local community'' on the map, they answered a
battery of questions about their perceptions of the relative size of
ethnic/racial groups captured in their drawing:  ``Just your best guess ---
what percentage of the population in your local community is \ldots'' The list
of groups included the following: Blacks, Canadian Aboriginals, Whites,
Chinese, Latin Americans, South Asians (East Indian, Pakistani, Sri Lankan,
etc.), and Other Asians (Korean, Japanese, Filipino, etc.). The percentage
perceived visible minority in a context was an index adding together responses
following the government's definition of ``visible minority.''\footnote{Because
people routinely overestimate the size of minority groups for a range of
reasons, the index often exceeded 100 percent \citep{landy2018, hippwickes,
wongpoq, Wong2018}. The question format used an interactive slider, so any
response between 0 and 100 was possible for each group. We consider Census
numbers as objective, but recognize that respondents may be thinking about a
demographic composition that is not residence-based \citep{hamel2022}.
Nevertheless, we do not expect that the responses will be as accurate as any
numbers reported by the Census \citep{velez2017, moorereeves}.}

We also showed respondents, at random with equal probability, a map of one of
six administrative geographic areas highlighted, centered on their address or
postal code:  the area ranged from the respondent's smallest Census unit
(dissemination area (DA)) to Canada as a whole. Respondents were told the name
of the administrative unit the map represented, and were shown its boundaries
overlaid on a Google Map.  They were then were given the same battery of questions
about the demographic make-up of this fixed geography. We use both perceptions
of their own hand-drawn map and perceptions of fixed Census neighborhoods (DAs)
as our measures of perceptions in this paper.  Since more than one respondent
might have been shown the same fixed Census neighborhood, this will allow us
(in Appendices C.2, C.3, C.4) to show that the effects of differences in
perceptions are not driven by differences in maps drawn.

% Thus, we have three measures of subjective context for each respondent: the
% boundaries of their own community, perceptions of the ethnic diversity of
% their own community, and perceptions of the ethnic diversity of an
% administrative unit in which they live.

% supp_desc_new.Rout
% > ## Their perceptions of DA when shown a DA polygon
% > summary(wrkdat_DA0_new$vm)
%    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
%  0.0400  0.1600  0.2800  0.3722  0.4900  4.6400     427
% > quantile(wrkdat_DA0_new$vm, c(.05, .5, .95), na.rm = TRUE)
%    5%   50%   95%
% 0.060 0.280 0.893
% > summary(wrkdat_DA0_new$vm.norm2)
%    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
%  0.0400  0.1600  0.2800  0.3563  0.4900  1.0000     427
% > quantile(wrkdat_DA0_new$vm.norm2, c(.05, .5, .95), na.rm = TRUE)
%    5%   50%   95%
% 0.060 0.280 0.893
% >
% > ## Census
% > summary(wrkdat_DA0_new$da_prop_vm_20pct_06)
%    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
% 0.00000 0.01942 0.06828 0.13518 0.18432 0.96321
% > quantile(wrkdat_DA0_new$da_prop_vm_20pct_06, c(.05, .5, .95))
%         5%        50%        95%
% 0.00000000 0.06827894 0.50640449
% # Perceptions of their map
%% > summary(wrkdatOwnMap_new$vm.community.subj)
%%    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
%%  0.0000  0.1225  0.2900  0.3647  0.5175  4.2700
%% > summary(wrkdatOwnMap_new$vm.community.norm2)
%%    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
%%  0.0000  0.1225  0.2900  0.3506  0.5175  1.0000
%% > ## Our best guess of the census proportion in the map.
%% > summary(wrkdatOwnMap_new$vm.community.obj)
%%    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
%% 0.00000 0.03042 0.09293 0.14468 0.21029 0.94224      11
%% % These next two require only valid polygons --- so many fewer observations
%% > summary(wrkdatOwnMap_new$prop_vmpop_map_avg)
%%    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
%%   0.000   0.030   0.096   0.140   0.208   0.857    5101
%% > summary(wrkdatOwnMap_new$prop_vmpop_map_dawt)
%%    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
%%   0.000   0.023   0.078   0.124   0.180   0.794    5099

The respondents overestimate the percentages of visible minorities in all their
contexts: the median response was 28\% visible minority for those viewing a map
of their DAs while the median Census measurement for these ``neighborhoods''
was 7\%;  the median perception of proportion visible minority of their
hand-drawn ``local community'' was also 29\% while our median estimate of the
proportion visible minority in the boundaries of their maps using Census data
was 10\% (weighting all DAs touching the hand-drawn map equally in their
contribution to objective context within the subjective boundaries) or 8\%
(weighting each DA in proportion to the land area it accounted for within the
hand-drawn map).\footnote{Measuring the objective context of a geographic
object with subjective boundaries using data from the Canadian Census is
difficult since the hand-drawn boundaries rarely follow DA boundaries. Since
objective context of the subjective boundaries is not the central focus on this
paper, we provide only two approximations: one simply averages the proportion
visible minority as measured by the Canadian Census in each DA that overlaps in
anyway with the given set of polygons drawn by the survey respondent, and the
other calculates the proportion of the area in the hand-drawn map that overlaps
with each DA and weights the DA contributions to the estimated visible minority
proportion in the map by this contribution.} These overestimates are consistent
with previous research (see \textcite{guayquirks} for a recent example).

\section{Design: Isolating Perceptions from Objective Context}\label{sec:design}

Our research design uses 3772 respondents living in 3098 DAs and creates pairs
of people with different perceptions, living in very similar (or even
identical) DAs in terms of proportion visible minority, the amount of change in
proportion visible minority between 2016 and 2006 as measured by the Census,
and within the 2006 Canadian Census categories for urban versus
rural.\footnote{This approach of creating pairs of units who are similar in
regards a measure that has more than two categories (or is continuous in our
case) is called optimal non-bipartite matching \citep{lu2011optimal,
lu2001matching, rosenbaum2009design}. We used the Canadian Census 2006
definitions for ``urban" as a CSD having a population of at least 1000 and
population density of at least 400. See the appendix for more information about
the design and matches.} Because DAs do not vary much in total population ---
most contain between 400 and 700 people by design --- our matched respondents
live in environments with very similar total population.\footnote{See Appendix
F for more details about the design. The non-bipartite matching algorithm that
we used \citep{zubizarreta2023aa} allowed us to specify that all pairs must
differ in perceptions. Pairs that do not differ in perceptions provide no
statistical power for the subsequent analyses that compare the person who
perceives more visible minorities to the person who perceives fewer visible
minorities within pair.}

% from Analysis/supp_desc_new.Rout
% ## Total number of valid respondents in the anyDA design
% nrow(wdat0)
% # [1] 6386
% ## Total number of respondents used in the matching after exclusions
% nrow(wdat0[!is.na(wdat0$pair), ])
% # [1] 3772
% ## Number of pairs
% num_pairs
% # [1] 1886
% ## Number of DAs
% num_das
% # [1] 3098

This paired research design removed differences between people due to objective
context without trying to hold constant any other covariates. Before pairing we
would have compared whites living in areas with no visible minorities to whites
living in places with nearly 100 percent visible minorities. In the design we
present here,  99\% of the pairs differed by less than 0.036 percentage points
in proportion visible minority, the maximum difference in percent visible
minority within a pair was less than .04 percentage points, and 70 percent of
the matches were identical in regards object context. Also, no two people
within a pair differed by more than 3 percentage points in change in visible
minority population between 2006 and 2016, with 50\% of pairs differing by less
than .8 percentage points of change.

% from Design/match_assess_anyDA_new.Rout                                                                                                           
%> sapply(pairdiffs, function(x) {                                                                           
%+   quantile(x, sort(unique(c(seq(0, 1, .1), seq(.9, 1, .01)))), na.rm = TRUE)                              
%+ })                                                                                                        
%       pair da_prop_vm_20pct_06 vm_change vm.community.subj csd_pop_06 csd_pop_dens_06 csd_prop_vm_20pct_06 
%0%      1.0           0.0000000  0.000000            0.0100          0            0.00             0.000000 
%10%   189.5           0.0000000  0.000000            0.0300          0            0.00             0.000000 
%20%   378.0           0.0000000  0.000000            0.0600          0            0.00             0.000000 
%30%   566.5           0.0000000  0.000000            0.0800       3476           10.55             0.003316 
%40%   755.0           0.0000000  0.003436            0.1200      10457           34.02             0.009075 
%50%   943.5           0.0000000  0.007808            0.1700      31284           84.22             0.017985 
%60%  1132.0           0.0000000  0.012185            0.2200      72679          160.56             0.030590 
%70%  1320.5           0.0000000  0.016475            0.2900     150722          270.55             0.052144 
%80%  1509.0           0.0000993  0.020390            0.3800     433140          505.74             0.095595 
%90%  1697.5           0.0001970  0.024477            0.5700     811542         1642.19             0.191771 
%91%  1716.4           0.0002062  0.025003            0.5835     890718         2338.33             0.198537 
%92%  1735.2           0.0002204  0.025628            0.6100     983953         2612.74             0.224051 
%93%  1754.1           0.0002324  0.026221            0.6400    1512561         2622.17             0.234841 
%94%  1772.9           0.0002555  0.026669            0.6700    1542636         2756.71             0.259034 
%95%  1791.8           0.0002701  0.027273            0.7000    1834732         2904.36             0.304956 
%96%  1810.6           0.0002913  0.027909            0.7800    1925240         3085.83             0.319108 
%97%  1829.5           0.0003117  0.028365            0.8500    2298613         3350.71             0.333054 
%98%  1848.3           0.0003376  0.029047            0.9300    2395483         3528.41             0.373991 
%99%  1867.2           0.0003612  0.029502            1.1115    2445965         3779.94             0.417343 
%100% 1886.0           0.0003962  0.030000            4.1900    2501910         4552.79             0.542242 

Within pairs holding nearly constant the objective characteristics of where
people live, do people still differ in their perceptions of their surroundings?
Our primary research design requires that each pair differ in perceptions ---
after all, a difference in social cohesion attitudes between two people who
differ in perceptions is undefined if those two people do not in fact differ in
perceptions and those pairs would drop from the analysis. To answer the
preliminary question of whether two people living in the same objective context
are likely to differ in their perceptions, we recreated the matched design
described above without any requirements on the amount of difference in
perceptions. If objective context is a good proxy for perceptions we should
expect nearly no variation within pair in perceptions.\footnote{We focus first
on respondents' self-defined communities because these are the most salient and
personally relevant geographic contexts. Nevertheless, we also use respondents'
perceptions of their objective DAs as an alternative measure of subjective
context. We discuss those results in the next section and appendix. They do not
differ substantively from the results we present here.} The pairs in this
unrestricted perceptions design (where people were matched on the same
objective context numbers as the main design but with no mention of
perceptions) were successfully matched on objective context: 80\% of the pairs
were identical in proportion visible minority, with the largest difference
being less than 1 percentage point, and 90\% of the pairs differed by less than
2 percentage points in change in visible minority between 2016 and 2006. Yet,
the majority of pairs differed in perceptions: only 45 out of 1638 pairs
(roughly 3\%) had two people with the same perceptions, the mean difference in
perceptions is 21 percentage points, and 50\% differed by between 7 and 30
percentage points.

%  from Design/r2_descriptions.R
%summary(pair_diffs_abs$perc_diffs)
%#    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
%#  0.0000  0.0700  0.1500  0.2132  0.2975  1.0000
%quantile(pair_diffs_abs$perc_diffs, seq(0, 1, .1))
%#   0%  10%  20%  30%  40%  50%  60%  70%  80%  90% 100%
%# 0.00 0.02 0.05 0.08 0.11 0.15 0.20 0.26 0.35 0.50 1.00
%mean(pair_diffs_abs$perc_diffs == 0)
%# [1] 0.02747253
%sum(pair_diffs_abs$perc_diffs == 0)
%# [1] 45
%nrow(pair_diffs_abs)
%# [1] 1638
%sapply(pair_diffs_abs[, -1], function(x) {                                      
%  return(quantile(x, seq(0, 1, .1), na.rm = TRUE))                              
%})                                                                              
%                                                                                
%#     perc_diffs cohesion_diffs efficacy_diffs da_prop_vm_20pct_06    vm_change 
%# 0%         0.00     0.00000000          0.000        0.000000e+00 0.0000000000
%# 10%        0.02     0.00000000          0.000        0.000000e+00 0.0000000000
%# 20%        0.05     0.08333333          0.125        0.000000e+00 0.0000000000
%# 30%        0.08     0.08333333          0.125        0.000000e+00 0.0000000000
%# 40%        0.11     0.08333333          0.125        0.000000e+00 0.0001389915
%# 50%        0.15     0.16666667          0.125        0.000000e+00 0.0047979798
%# 60%        0.20     0.16666667          0.250        0.000000e+00 0.0096268182
%# 70%        0.26     0.25000000          0.250        0.000000e+00 0.0138230024
%# 80%        0.35     0.25000000          0.375        0.000000e+00 0.0188679245
%# 90%        0.50     0.33333333          0.500        6.067668e-05 0.0238387655
%# 100%       1.00     0.75000000          1.000        1.489647e-04 0.0300000000


Returning to our main design that requires non-zero differences in perceptions
in the same way that an experiment would require both treated and control units
within a pair, we can report that those pairs differ in perceptions on average
by 25 percentage points, with a minimum difference of .01 percentage points by
construction, and 50\% of the differences fall between 7 to 33 percentage
points. That is, differences in perceptions between people living in the same
kinds of context are the norm in this study.

% from Design/match_assess_anyDA_new.Rout
%> sapply(pairdiffs, summary)
%          pair da_prop_vm_20pct_06 vm_change vm.community.subj 
%Min.       1.0           0.000e+00  0.000000            0.0100
%1st Qu.  472.2           0.000e+00  0.000000            0.0700
%Median   943.5           0.000e+00  0.007808            0.1700
%Mean     943.5           4.632e-05  0.009957            0.2426
%3rd Qu. 1414.8           4.411e-05  0.018504            0.3300
%Max.    1886.0           3.962e-04  0.030000            4.1900

% in assessing the matched design we are using the raw perceptions scores which
% sometimes (rarely) add up to more than 100 pct. This means that we have about
% 1 pct of pairs with perceptual differences greater than 1: two people who
% live in the same place but differ a lot in their perceptions.

This design, and the versions described below, holds objective context (nearly)
constant so that we may assess the differences in social cohesion attributable
to perceptions isolated from objective context. The description of our design
also reveals that perceptions differ within a pair even when the objective
context is the same (whether by construction or without restriction on
perception differences within pair). The Appendix contains the results of four
other designs, including a design that compares people who live in exactly the
same DA who are asked to evaluate the visible minority proportion of that DA:
even those people differ in their perceptions of diversity of their DA. Notice
that this approach to research design allow us to describe the relationship
between perceptions and outcomes while partialling out the influence of
objective context in a non-parametric manner. This relationship is exactly as
would be implied by the two path theory, and we show it below. We are not
estimating the causal effect of perceptions of diversity on perceptions of
social cohesion under a selection on observables assumption (after all we are
only matching on one or two covariates); rather we are describing how
perceptions of diversity relate to perceptions of social cohesion after holding
constant objective context. If objective context and perceptions stand in for
one another,  the two path theory is not useful. If perceptions vary within
pair, and those within-pair differences in perception are systematically
related to within-pair differences in social cohesion, we will have discovered
that context matters via the path of perceptions. Notice also that we are not
exploring the interaction of perceptions and objective context in this paper:
many other papers have established that objective context has a relationship
with outcomes such as social cohesion. By adding perceptions we help explain
why those relationships have varied --- some of them arise from the operation
of direct experience with the context and others, our evidence suggests below,
should arise from the operation of perceptions.

\section{Analysis: How Do Pseudoenvironments Influence Social Cohesion?}\label{sec:perceptions_matter}


Our empirical strategy in this paper comes in two general stages. In the first
stage (which we called ``Design" in the previous section), we created pairs of
survey respondents who live in objectively similar places in regard to ethnic
homogeneity in their home Census Dissemination Areas (DA). The second stage
(which we call ``Analysis") describes how people who perceive more ethnic
diversity than their paired respondent also differ with regard to their
responses to survey questions about social cohesion and collective efficacy.

If we could have implanted two different perceptions in the mind of a person
and compared their responses to the outcome questions, we would not have needed
to create pairs in order to isolate perceptions from objective context: we
would have had a single person living in an identical place with two different
perceptions of that place. Alternatively, if we had been able to randomly
assign perceptions to the minds of many people, we could also have isolated the
two mechanisms of the bundle of drivers that we are calling ``perceptions" and
the bundle of drivers that we call objective context as they influence the
outcomes. These two idealized designs suffer from problems of feasibility and,
more importantly, connection to the theory. The effect of being told to
perceive one's environment in a particular way is different from the effect of
the natural perceptions that are generated from experience upon facing a survey
question. That said, the paired designs that we created should allow us to
isolate the way perceptions of place matter for the outcome in a way that is
separate from the way objective context matter: if the person who perceives
more diversity in their environment within the pair tends to be the person who
also reports less social cohesion, then we can claim that this difference is
not due to differences within pair arising from differences in objective
context. Our analysis of the data makes exactly such calculations, and Appendix
C shows a total of five different paired designs demonstrating that the
substantive results hold regardless of the details of how we create the pairs.

% from Analysis/supp_desc_new.Rout
% > ## How many DAs shared across pairs?
% > num_das <- with(wdat0[!is.na(wdat0$pair), ], table(dauid))
%table(num_das)
%# num_das
%#    1    2    3    4    5    6    9
%# 2533  496   47   12    5    4    1
% 496+47=543
%table(num_das > 1)
%#
%# FALSE  TRUE
%#  2533   565
%table(num_das > 3)
%#
%# FALSE  TRUE
%#  3076    22

How do we do this analysis? The simplest analysis would subtract outcome values
within pair and regress those differences on within-pair differences in
perception.\footnote{This approach is also known as a ``fixed effects"
approach.} The analyses that generate the results that we present here build on
and extend this pair-differences approach because (1) common calculations of
standard errors using this approach will tend to produce overly small standard
errors that do not account for the fact that people are clustered in
dissemination areas such that two or more people might share a DA even if they
are spread across different pairs,\footnote{Roughly 2533 respondents are the
only survey respondents in their DA, but about 543 share a dissemination area
with 1 or 2 other respondents, and 22 share their dissemination area with more
than 2 other survey respondents. Since pairs can only contain 2 respondents,
two people from the same dissemination area might be paired with two other
people from two different DAs or two people from the same other DA.}  and (2)
we would like to reduce the influence of any small within-pair objective
context differences left over from the design stage.\footnote{We follow
\textcite{rubi:thom:comb:2000} in combining a stratified research design with
covariance adjustment. To make the case for the two path theory of context
effects,  we aim only to isolate subjective from objective differences not
subjective from all other observed differences between people.} Multilevel
models allow us to describe the relationship between within-pair differences
while calculating standard errors that account for cross-pair clustering by DA
and removing any remaining average linear relationship between pair-members in
objective context.  We use that modeling strategy for the results presented
here. The disadvantage of the multi-level model is that it requires an
assumption about the probability process generating the outcomes (a likelihood
function), which would not be necessary were we to pursue the simpler but
perhaps overly optimistic approach of fixed-effects. To address these
trade-offs, Appendix D shows that the simple, fixed effects approach and two
multilevel modeling based approaches (one fully Bayesian and the likelihood
based approach presented here) all give substantively the same answers, and
nearly the same answers numerically.\footnote{We explain more about the ``pair
fixed effects" or ``pair differenced" approach and how it relates to the
multilevel model and the fully Bayesian multilevel model in Appendix D.}

Equations~\ref{eq:mlm_dgp} and~\ref{eq:mlm_mod} show the multilevel model
describing how mean social cohesion ($\mu$) for respondents $i=1,\ldots,n$ in
pairs matched on objective context $s=1,\ldots,S$ and dissemination areas
$d=1,\ldots,D$ varies as a function of perceptions and remaining objective
context differences within pair. The outcome and two random effects are modeled
as arising from three different Normal distributions in the creation of the
likelihood function that we use for estimation and statistical
inference.\footnote{Appendix D shows R code for this model as well as a fully
Bayesian model with $t$-distributions for priors as well as the fixed effects
model.} If we had only written $\mu_{is}=\alpha_{s}+\beta_1
\text{perceptions}_{is}$ we would have the equivalent of a fixed effects or
within-pair model where $\beta_1$ is the relationship between within-pair
perceptions differences and the within-pair differences in social
cohesion.\footnote{We follow \autocite{smith:1997} in the idea that one can use
random effects in lieu of fixed effects in the analysis of a stratified
observational study.} The random effect term $\alpha_{d}$ models the
dissemination area clustering across pairs. And the term $\beta_2
\text{objective}_{id}$ adjusts the calculation of $\beta_1$ for any remaining
linear relationship between perceptions and objective context within pair:
although most pairs are nearly identical in objective context, we would like to
ensure that if there is any overall relationship such that the higher perceiver
tends to live in the more diverse place than the lower perceiver within the
pair, we remove that relationship.

\begin{flalign}
  y_{isd} \sim & N(\mu_{isd},\sigma_{isd}) \nonumber \\
  \alpha_{s} \sim & N(\gamma_{s,0},\sigma_{s}) \label{eq:mlm_dgp} \\
  \alpha_{d} \sim & N(\gamma_{d,0},\sigma_{d}) \nonumber
\end{flalign}

\begin{equation}
  \mu_{isd} = \underbrace{\alpha_{d}}_{\text{DA random effect}}+
\underbrace{\alpha_{s}}_{\text{Pair random effect}}+
\underbrace{\beta_1 \text{perceptions}_{is}}_{\text{Effect of perception differences}} +
  \underbrace{\beta_2 \text{objective}_{id}}_{\text{Remaining objective DA diffs}}  \label{eq:mlm_mod}
\end{equation}

Since we have two random effects that are not nested, we present profile
confidence intervals below rather than Wald intervals. The Wald interval uses
the second-derivative of the log-likelihood function evaluated at its maximum
as an estimator of a standard error and uses a Normal approximation and
assumption of symmetry of the likelihood function around the maximum to create
confidence intervals. However, when the likelihood surface is complicated (such
as when we have two random effects), the Wald approach can yield inaccurate
estimates of standard errors. The profiling approach calculates an interval of
possible parameter estimates around the maximum of the likelihood function for
a given parameter instead of calculating a standard error and then relying on
assumptions about symmetry and Normality to calculate an interval.
\textcite{pinbates,raudbryk02} suggest the use of profile-based intervals for
complex multilevel models, and we follow their advice below.

\subsection{Results}

Figure~\ref{fig:coefplot_anyDA} shows the relationship between perceiving more
minorities and responses to the social cohesion and collective efficacy scales.
For two respondents who live in almost identical contexts, the one who
perceives more minorities in her local community is more likely to think people
who live in that community do not share the same values, do not get along, and
would not help each other.

\begin{figure}[!htb]
 \centering
 \includegraphics[width=.99\linewidth]{coefplot_anyDA_new.pdf}
 \caption{The influence of perceptions of visible minorities on
     social cohesion and community
   efficacy holding constant objective context. Points show the average difference
   in perceptions of visible minorities in the hand-drawn ``local community''
 on outcomes (listed on the y-axis) conditional on objective-context matched pair (3772 pairs, 3098
   DAs) and using the model shown in eq.~\ref{eq:mlm_mod}. The segments
show 95\% profile-likelihood confidence intervals
\citep{bates2015lme4}.}\label{fig:coefplot_anyDA}
\end{figure}

% > ## Summarize main analysis (from Analysis/supp_desc_new.Rout)
%
%res
%#                        Estimate Std. Error         ci1         ci2
%# Social Cohesion     -0.06553736 0.01053103 -0.08617576 -0.04490193
%# Collective Efficacy -0.05057089 0.01397528 -0.07797394 -0.02318029
%
%## To help interpret the results of the analysis
%summary(wdat0[!is.na(wdat0$pair), c("social.capital01", "community.resp01", "vm.community.norm2")])
%#  social.capital01 community.resp01 vm.community.norm2
%#  Min.   :0.0000   Min.   :0.0000   Min.   :0.0000
%#  1st Qu.:0.5833   1st Qu.:0.6250   1st Qu.:0.0900
%#  Median :0.7500   Median :0.7500   Median :0.2300
%#  Mean   :0.7041   Mean   :0.7412   Mean   :0.2994
%#  3rd Qu.:0.8333   3rd Qu.:0.8750   3rd Qu.:0.4500
%#  Max.   :1.0000   Max.   :1.0000   Max.   :1.0000

%sapply(wdat0[!is.na(wdat0$pair), c("social.capital01", "community.resp01", "vm.community.norm2")], sd, na.rm = TRUE)
%#   social.capital01   community.resp01 vm.community.norm2
%#          0.1493546          0.1974179          0.2561378
%sapply(wdat0[!is.na(wdat0$pair), c("social.capital01", "community.resp01", "vm.community.norm2")], function(x) {
%    return(quantile(x, seq(0, 1, .1), na.rm = TRUE))
%})
%#     social.capital01 community.resp01 vm.community.norm2
%# 0%          0.0000000            0.000               0.00
%# 10%         0.5000000            0.500               0.03
%# 20%         0.5833333            0.625               0.07
%# 30%         0.6666667            0.625               0.11
%# 40%         0.6666667            0.750               0.17
%# 50%         0.7500000            0.750               0.23
%# 60%         0.7500000            0.875               0.31
%# 70%         0.7500000            0.875               0.39
%# 80%         0.8333333            0.875               0.50
%# 90%         0.9166667            1.000               0.68
%# 100%        1.0000000            1.000               1.00

% > pair_diffs_abs <- wdat0 %>%
% +     filter(!is.na(pair)) %>%
% +     group_by(pair) %>%
% +     summarize(
% +         perc_diffs = abs(diff(vm.community.norm2)),
% +         cohesion_diffs = abs(diff(social.capital01)),
% +         efficacy_diffs = abs(diff(community.resp01))
% +     )
%
%summary(pair_diffs_abs)
%#       pair          perc_diffs     cohesion_diffs
%#  Min.   :   1.0   Min.   :0.0000   Min.   :0.00000
%#  1st Qu.: 472.2   1st Qu.:0.0700   1st Qu.:0.08333
%#  Median : 943.5   Median :0.1600   Median :0.16667
%#  Mean   : 943.5   Mean   :0.2239   Mean   :0.15893
%#  3rd Qu.:1414.8   3rd Qu.:0.3200   3rd Qu.:0.25000
%#  Max.   :1886.0   Max.   :1.0000   Max.   :0.91667
%#  efficacy_diffs
%#  Min.   :0.0000
%#  1st Qu.:0.1250
%#  Median :0.1250
%#  Mean   :0.2126
%#  3rd Qu.:0.2500
%#  Max.   :1.0000
%summary(pair_diffs_abs$perc_diffs)
%#    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
%#  0.0000  0.0700  0.1600  0.2239  0.3200  1.0000
%sapply(pair_diffs_abs[, -1], sd, na.rm = TRUE)
%#     perc_diffs cohesion_diffs efficacy_diffs
%#      0.2001013      0.1345321      0.1736004
%sapply(pair_diffs_abs[, -1], function(x) {
%    return(quantile(x, seq(0, 1, .1), na.rm = TRUE))
%})
%#      perc_diffs cohesion_diffs efficacy_diffs
%# 0%        0.000     0.00000000          0.000
%# 10%       0.030     0.00000000          0.000
%# 20%       0.060     0.08333333          0.000
%# 30%       0.080     0.08333333          0.125
%# 40%       0.120     0.08333333          0.125
%# 50%       0.160     0.16666667          0.125
%# 60%       0.210     0.16666667          0.250
%# 70%       0.280     0.16666667          0.250
%# 80%       0.370     0.25000000          0.375
%# 90%       0.535     0.33333333          0.500
%# 100%      1.000     0.91666667          1.000

The coefficient from the model for social cohesion is -.065 --- representing
the average difference in social cohesion score between a person perceiving no
visible minorities in their local community (0\%) and a person who perceives
that 100\% of their local community is visible minority. We present such an
unrealistic coefficient both to connect it with the model itself and to the
multiple auxiliary analyses that we present later in the paper. For now,
however, let us put this estimate in perspective. Few pairs differ by 100
percentage points in perceptions: 50\% differ by 16 percentage points or less and 90\%
of pairs differ by less than 54 percentage points. Given a typical difference
in perceptions within pair,  for example, of 20 percentage points, our results
predict a difference of -.065*.20 $\approx$-.013 on the social cohesion scale.
Is this a large difference in regards to the outcome? Pairs differ in social
cohesion by about .17 and community efficacy by about .13 (the median
differences) on 0 to 1 coded scales. So, a roughly median difference in
perceptions would be associated with about a tenth of a median difference in
social cohesion or community efficacy: a moderate effect if we are thinking
about typical differences in surveys. We could also say that an extreme
difference in perceptions within pair would lead to a moderate difference in
the outcomes within pair (.065 being close to 1/2 of the median difference
within pairs in the outcomes). Another way to see this relationship is in
standardized scales. The standard deviation of pairwise differences in
perceptions is .20 and the standard deviations of social cohesion and community
efficacy are .13 and .17 respectively.  So, the effect of 1 sd difference in
perceptions is about $-.1=-.065 \times \left(\frac{.20}{.13} \right)$ standard
deviations on the social cohesion scale or about $ -.08 = -.065 \times \left(
\frac{.20}{.17} \right)$ standard deviations on the community efficacy scale.
These are all moderate to low effect sizes estimated relatively precisely by
our research design.

% from Analysis/analysis_anyDA_new.R
% > appendix_tab
%
%#            Social Cohesion MLM Social Cohesion Bayes MLM
%# Estimate           -0.06553736               -0.06586773
%# Std. Error          0.01053103                0.01040184
%# ci1                -0.08617576               -0.08650562
%# ci2                -0.04490193               -0.04595609
%#            Social Cohesion FE Collective Efficacy MLM
%# Estimate          -0.06603539             -0.05057089
%# Std. Error         0.01658262              0.01397528
%# ci1               -0.09855762             -0.07797394
%# ci2               -0.03351317             -0.02318029
%#            Collective Efficacy Bayes MLM
%# Estimate                     -0.05026532
%# Std. Error                    0.01410360
%# ci1                          -0.07770287
%# ci2                          -0.02226625
%#            Collective Efficacy FE
%# Estimate             -0.033269100
%# Std. Error            0.021422384
%# ci1                  -0.075283193
%# ci2                   0.008744993

% # Now looking at relationship between higher versus lower perceiver more directly
% %> res_rank
%#                               Estimate Std. Error
%# Social Cohesion (lmer)     -0.05249205 0.01470844
%# Social Cohesion (brm)      -0.05212955 0.01466473
%# Collective Efficacy (lmer) -0.02969247 0.01453784
%# Collective Efficacy (brm)  -0.02962762 0.01394223
%#                                    ci1          ci2
%# Social Cohesion (lmer)     -0.08131592 -0.023668171
%# Social Cohesion (brm)      -0.08077841 -0.023539692
%# Collective Efficacy (lmer) -0.05818203 -0.001202913
%# Collective Efficacy (brm)  -0.05650843 -0.003190642


%  from Analysis/analysis_anyDA_new.R
%## In how many pairs is the higher perceiver the person with person with the
%## lower social cohesion score?
%table(paired_data$social_cohesion_diff < 0)
%#
%# FALSE  TRUE
%#  1065   821
%table(paired_data$social_cohesion_diff < 0) / nrow(paired_data)
%#
%#     FALSE      TRUE
%# 0.5646872 0.4353128
%## In how many pairs is the higher perceiver the person with person with the lower community efficacy score?
%table(paired_data$community_efficacy_diff < 0)
%#
%# FALSE  TRUE
%#  1106   780
%table(paired_data$community_efficacy_diff < 0) / nrow(paired_data)
%#
%#     FALSE      TRUE
%# 0.5864263 0.4135737

Another description of the relationship between perceptions and social cohesion
within pairs is simply the proportion of pairs in which the person who reports
perceiving more diversity is also the person with the lower social cohesion
score. In this case, 56\% of pairs have this pattern versus 44\% of pairs
either tied in social cohesion or where the person perceiving more diversity
has the higher social cohesion score. For collective efficacy, the numbers are
similar: 59\% of pairs have the higher diversity perceiver with the lower
collective efficacy score.

These results help explain why diversity diminishes support for social goods
provision:  senses of reciprocity and shared preferences are weaker when
majority group members believe they live among more outgroup members, even if
they actually live among relatively few outgroup members according to the
census. The social cohesion and collective efficacy indices capture attitudes
about what respondents think \emph{other} people in their community would do.

\subsection{Alternative Designs}\label{sec:alt_designs}

We created four additional designs that we summarize here. We describe each and
present results in the appendix: all findings tell the same story, regardless
of the design used.

\subsubsection{Matching on Similar DAs, Perceiving One's DA}\label{sec:sim_dat_perc_da}

In the analyses presented above, we compare people who drew different community maps and
thus reported different perceptions of different objects, even if they lived in
nearly equally diverse DAs. Using only those respondents who reported on the
perceptions of their own DA, we follow the same design: creating pairs that
minimize differences in the percent visible minority as measured by the Census
for the respondents' DAs, within 3 percentage points of change in percent
visible minority between 2006 and 2016, and within urban vs rural
classification.

\subsubsection{Matching on the Exact Same DA, Perceiving One's Community}\label{sec:sam_dat_perc_comm}

It is possible that matching someone from a dissemination area in Vancouver and
a person living in an equally diverse dissemination area in Toronto is not a
good comparison; the cities have distinctive histories and demographic
compositions, even if the DAs are relatively similar in size and are both
embedded within large cosmopolitan cities. Therefore, we replicated our
analyses, matching only individuals who lived in exactly the same DA; we looked
at the influence of perceptions of their self-drawn communities.

\subsubsection{Matching on the Exact Same DA, Perceiving One's DA}\label{sec:sam_dat_perc_da}

We replicated the analyses, matching only individuals who lived in exactly the
same DA, and looking at the impact of perceptions of those DAs. There are only
roughly a dozen such pairs in the dataset.

\subsubsection{Diversity Indices for Both Matching and Perceptions}\label{sec:diversity_indices}

Living in a community where a single outgroup forms a majority could be
different from living in a community where no single group is the numerical
majority, but where the numbers of multiple different visible minorities add up
to more than 50 percent. By focusing on the percentage of visible minorities in
aggregated form, we may be comparing apples and oranges; this is especially
true if attitudes and behavior are driven by perceptions that one's ingroup is
outnumbered by a unified outgroup. Therefore, we repeat our analyses, this time
using a diversity index (the Herfindahl-Hirschman index) for both the matching
algorithm and for the perception measure.  In other words, we match individuals
whose dissemination areas are similar in ethnic fractionalization and compare
the effects of perceiving greater fractionalization (using respondents'
perceptions of the size of each group instead of Census numbers in the
formula). Scholars have argued that diversity or fractionalization indices can
often hide a great deal of heterogeneity across cases \citep{fearon2003ethnic,
posner2004measuring} and so we require slightly tighter comparisons on change
in visible minority population (2.5 percentage points) and also use the same
exact matching on urban vs rural.

\medskip

All four alternative designs produce similar results: regardless of how we
create pairs of people so that they live in comparable objective environments,
the individual within each pair who perceives greater ethnic heterogeneity
reports less social cohesion and collective efficacy.

\section{Alternative Explanations}\label{sec:alt_exp}

One might wonder whether antecedent conditions uncorrelated with objective
context could explain both perceptions and social cohesion. Thus, our results
would be explained not by differences in perceptions within pair, but
differences in ethnocentrism or socioeconomic status that are uncorrelated with
the ethnic diversity of a place, for example. We address this topic briefly to
assuage worries about alternative explanations based on prejudice and
socioeconomic status.\footnote{For example, if the higher perceivers differ
from lower perceivers within pairs systematically in ethnocentrism \emph{and}
ethnocentrism strongly predicts social cohesion, then our interpretation of the
impact of differences within pair in subjective context might be confounded
with differences in ethnocentrism. A general challenge to studying effects of
perceived contextual characteristics is that there may be variables affecting
both perceptions and the outcomes.}

\subsection{Could ethnocentrism drive our results?}

What if prejudice explains our description of differences more than
perceptions? For example, prejudiced individuals may react more strongly to
outgroup members and thus perceive more of them \citep{nadeau1993}. In other words, more
prejudiced white individuals living in nearly identically diverse neighborhoods
may \emph{both} perceive more visible minorities living near them \emph{and} be
more likely to believe their neighbors do not share their values. In that case,
while (mis)perceptions may be part of the story, the real engine driving the
relationship would be the underlying ethnocentrism that exists as a stable
personality trait unaffected by objective context (since this is held constant)
or subjective perceptions. Since it is beyond the scope of this paper to
explore the influence of all of the ways that people form perceptions ---
including their stereotypes, direct experience, or education --- we engage with
the question about ethocentrism briefly here to show that, in fact, the results
are not explainable by ethnocentrism.

If ethnocentrism drives our results,  we should see a positive relationship
between perceptions and expressions of prejudice. To assess this possibility we
created a racial resentment measure from three items in the survey, and using
the pairs from our first design we examined whether individuals who were more
prejudiced within pair were more likely to perceive more visible minorities in
their local communities.\footnote{See the Appendix for question wordings for
the items in the index.}  Our analyses show the opposite: the person within
each pair who expresses more racial resentment on average is also likely to see
\emph{fewer minorities} in her community than her counterpart. As expected from
past research, the figure also shows that more racial resentment is related to
(slightly) lower levels of social cohesion and (appreciably) lower collective
efficacy. It is clear that differences in ethnocentrism are not the same as
differences in perceptions nor do they act the same way in regards to our
outcomes.\footnote{As previous research has shown \citep{guayquirks, wongpoq},
misperceptions (particularly overestimates of minority groups and
underestimates of whites) occur for all groups, not just whites.  This provides
further evidence that ethnocentrism is not a likely confounding variable.}

\begin{figure}[!htb]
  \centering
 \includegraphics[width=.99\linewidth]{alt_explanations_plot_new.pdf}

  \caption{Does ethnocentrism predict both perceptions and social cohesion?
	  Within pairs, greater ethnocentrism is associated with \emph{lower}
	  perceived ethnic diversity, social cohesion, and collective efficacy.
	  Pairs matched on Census-based \% visible minority in the respondents'
  DA, CSD Urbanicity and change in \% visible minority in the DA between
2006 and 2016 as described above.}\label{fig:alt_objcomplots}

\end{figure}

\subsection{What about socio-economic status?}

Even if pre-existing ethnocentrism is not related to overestimates of visible
minorities within the local community maps drawn, could within pair differences
in socioeconomic status  drive our findings? We know that education and income
influence people's residential choices, they affect people's perceptions, and
they can prompt differential reactions to the environments in which they live
\citep{clark2009, herda2010many}. But, an alternative explanation could be that
perceptions are so strongly related to SES as to be empirically
indistinguishable. This explanation would say that, since the person within the
pair who perceives more visible minorities would have to be the person with
lower education and/or income \citep{dellicarpini}, our findings might merely
tell us that people with less education perceive less social cohesion in their
environments (relative to people living in more or less the same environments
but who have higher SES).

% from Analysis/supp_desc_new.Rout
% > ## Also adding education and income
% > wdat0$BAplus <- as.numeric(wdat0$educnew %in% c("bachelor's degree", "master's degree", "professional degree or doctorate"))
% >
% > pair_diffs <- wdat0 %>%
% +     filter(!is.na(pair)) %>%
% +     group_by(pair) %>%
% +     mutate(rank_perc = rank(vm.community.norm2)) %>%
% +     filter(rank_perc != .5) %>% # exclude pairs with the same perceptions
% +     reframe(
% +         educ_diff = BAplus[rank_perc == 2] - BAplus[rank_perc == 1],
% +         income_diff = income.coded[rank_perc == 2] - income.coded[rank_perc == 1],
% +         cohesion_diff = social.capital01[rank_perc == 2] - social.capital01[rank_perc == 1],
% +         efficacy_diff = community.resp01[rank_perc == 2] - community.resp01[rank_perc == 1],
% +         educ_abs_diff = abs(diff(BAplus)),
% +         inc_abs_diff = abs(diff(income.coded))
% +     ) %>%
% +     ungroup()
% >
% > summary(pair_diffs)
%#       pair          educ_diff         income_diff       cohesion_diff      efficacy_diff      
%#  Min.   :   1.0   Min.   :-1.00000   Min.   :-11.0000   Min.   :-0.91667   Min.   :-0.875000  
%#  1st Qu.: 474.2   1st Qu.:-1.00000   1st Qu.: -4.0000   1st Qu.:-0.16667   1st Qu.:-0.250000  
%#  Median : 945.5   Median : 0.00000   Median :  0.0000   Median : 0.00000   Median : 0.000000  
%#  Mean   : 944.7   Mean   :-0.02444   Mean   : -0.1906   Mean   :-0.01443   Mean   :-0.009299  
%#  3rd Qu.:1415.8   3rd Qu.: 0.00000   3rd Qu.:  3.0000   3rd Qu.: 0.08333   3rd Qu.: 0.125000  
%#  Max.   :1886.0   Max.   : 1.00000   Max.   : 11.0000   Max.   : 0.91667   Max.   : 1.000000  
%#                                      NA's   :471                                              
%#  educ_abs_diff     inc_abs_diff   
%#  Min.   :0.0000   Min.   : 0.000  
%#  1st Qu.:0.0000   1st Qu.: 1.000  
%#  Median :0.0000   Median : 4.000  
%#  Mean   :0.4803   Mean   : 3.979  
%#  3rd Qu.:1.0000   3rd Qu.: 6.000  
%#  Max.   :1.0000   Max.   :11.000  
%#                   NA's   :471     

% >
% > sapply(pair_diffs[, -1], function(x) {
% +     quantile(x, seq(0, 1, .1), na.rm = TRUE)
% + })
% >
%#      educ_diff income_diff cohesion_diff efficacy_diff educ_abs_diff inc_abs_diff
%# 0%          -1         -11   -0.91666667        -0.875             0            0
%# 10%         -1          -7   -0.25000000        -0.375             0            0
%# 20%         -1          -5   -0.16666667        -0.250             0            1
%# 30%          0          -3   -0.08333333        -0.125             0            2
%# 40%          0          -1   -0.08333333        -0.125             0            3
%# 50%          0           0    0.00000000         0.000             0            4
%# 60%          0           1    0.00000000         0.000             1            4
%# 70%          0           2    0.08333333         0.125             1            6
%# 80%          1           4    0.16666667         0.250             1            7
%# 90%          1           6    0.25000000         0.375             1            8
%# 100%         1          11    0.91666667         1.000             1           11

%mean(pair_diffs$educ_abs_diff == 0)
%# [1] 0.5196599
%
%educ_diffs <- table(pair_diffs$educ_diff, exclude = c())
%educ_diffs
%#
%#  -1   0   1
%# 475 978 429
%educ_diffs / sum(educ_diffs)
%#
%#        -1         0         1
%# 0.2523911 0.5196599 0.2279490
%
%income_diffs <- table(pair_diffs$income_diff, exclude = c())
%income_diffs
%#
%#  -11  -10   -9   -8   -7   -6   -5   -4   -3   -2   -1    0    1    2    3    4    5    6    7    8    9
%#   23   16   40   36   60   57   55   89   67   91  105  160   97   94   81   73   68   61   46   35   34
%#   10   11 <NA>
%#   14    9  471
%income_diffs / sum(income_diffs)
%#
%#         -11         -10          -9          -8          -7          -6          -5          -4          -3
%# 0.012221041 0.008501594 0.021253985 0.019128587 0.031880978 0.030286929 0.029224230 0.047290117 0.035600425
%#          -2          -1           0           1           2           3           4           5           6
%# 0.048352816 0.055791711 0.085015940 0.051540914 0.049946865 0.043039320 0.038788523 0.036131775 0.032412327
%#           7           8           9          10          11        <NA>
%# 0.024442083 0.018597237 0.018065887 0.007438895 0.004782147 0.250265675
%
%pair_diffs$income_diff_simp <- sign(pair_diffs$income_diff)
%income_diffs_simp <- table(pair_diffs$income_diff_simp)
%income_diffs_simp
%#
%#  -1   0   1
%# 639 160 612
%income_diffs_simp / sum(income_diffs_simp)
%#
%#        -1         0         1
%# 0.4528703 0.1133948 0.4337349

To assess this version of the socioeconomic alternative explanation, we asked
whether the higher perceiver within pairs tended to be the person with lower
education and/or lower income. We recoded the education variable to indicate a
college degree or more, contrasted with anyone with less than a college degree.
Using our first design, we compare the education levels of the respondents
within each of our pairs. We find that 52\% of the pairs have identical
education levels (in those pairs, which differ in perceptions but are constant
in education, differences in education cannot be a part of the differences in
social cohesion associated with differences in perceptions just as differences
in objective context cannot be part of that relationship); in 23\% of the
remaining matches, the individual with more education perceived more visible
minorities in her community, and in 25\%, the individual with less education
perceived more visible minorities in her community. We find a similar pattern
when it comes to income (coded in 12 categories): 11\% of pairs are identical
on income, in 43\% of pairs the person with higher income perceived more
visible minorities, and in 45\% of pairs the person with lower income perceived
more visible minorities. In other words, the relationship between socioeconomic
status and perceptions within those pairs is very weak. Socioeconomic status
does not determine which member of a pair \emph{matched on objective context}
perceives more or fewer visible minorities in their community, and in most of
the pairs, education cannot play a role in the relationship because both
members of the pair have the same education level. Thus, while socio-economic
status surely predicts perceptions in the same way it predicts political
knowledge, it does not do so strongly enough within pairs to be a credible
alternative explanation for our findings.

\section{Conclusion}\label{sec:conclusion}

There are two kinds of context effects: one kind (objective) does not depend on
an individual perceiving and/or understanding the character of the context
(e.g., the effects of voter registration laws or particulate pollution);
another kind, which we call ``pseudoenvironments'' following
\textcite{lippmann1922public}, does not have effects on attitudes and behaviors
unless it is perceived and evaluated. We add to the broad literature on context
effects with evidence in favor of this two path theory by (1) showing how
people living in nearly identical objective environments can have different
pseudoenvironments, and (2) that these pseudoenvironments relate to social
cohesion --- such that greater perceived diversity is related to lower social
cohesion --- even when objective environment is held nearly exactly
constant.\footnote{Given that our sample has a higher socioeconomic status than
that of Canada as a whole --- and SES has been shown to be negatively related
to ethnocentrism and positively related to knowledge --- we expect that our
findings are conservative relative to what would be found for a representative
sample.}

What about self-selection? The research design of this paper does not require
random selection of neighborhoods by people (or random assignment of people to
neighborhoods), let alone random assignment of perceptions to minds. People do
not choose where to live at random; both racial and economic segregation are
pronounced across Canada. Similarly, it is safe to assume that more and less
racist individuals have different considerations about what makes a
neighborhood ``good'' or not. People choose where they live and our research
design does not require us to make any claims about the exogeneity of objective
context of perceptions there of. Matching individuals on the demographic
make-up of their choice of residence allows us to isolate the relationship of
pseudoenvironments and outcomes from the impact of objective environments,
thereby clarifying a theoretically relevant descriptive relationship that would
have been otherwise clouded. We have shown that these results do not reflect
pre-existing differences in ethnocentrism nor socio-economic differences.
Furthermore, although it is not essential to our primary contribution, we note
that our findings here show that self selection does not entirely determine
perceptions.

A skeptical reader might raise reverse causality as a possible alternative
explanation for our results.\footnote{We have been explicit that we are not
making causal claims. Nevertheless, we note that reviewers have repeatedly
stressed to us that scholars of subjective context must be aware of the
potential for a range of methodological problems, including reverse causality,
confounding variables, and measurement bias.}  In other words, believing that
one's neighbors do not share one's values or would not help one another could
lead to perceiving more outgroup members in their community.  Given that we
have matched individuals on objective context, this explanation or
rationalization likely would be driven by ethnocentrism and negative
stereotypes of outgroup members.  However, as we have just shown, while
ethnocentrism can lead to lower levels of social cohesion and collective
efficacy, it leads to perceptions of \emph{fewer} outgroup members in their
community, not more.

Our findings are enlightening, particularly as we think of answers to the
question posed by \textcite[475]{portes2011diversity}:  ``What is the fuss
really about?'' Respondents who see more diversity around them expect that
others in their community will be less likely to share the same values, help
each other, or mobilize to benefit the community. This descriptive result lets
us build on the literature on ``conditional cooperation'' which suggests that
different mechanisms --- including norms and reciprocity --- may explain the
existence of greater civic-minded behavior than would be expected from theories
of self-interest \citep{frey2007tax}. Answers to our survey questions suggest
both mechanisms are at work, but that \emph{perceptions} play a key
role.\footnote{If objective context is not simply a proxy for subjective
context, one may wonder how the former is still related to social cohesion? One
possibility is that greater demographic heterogeneity could mean political
attention and  resources are focused on visible minorities (the outgroup).
This reduction in attention to one's ingroup can lead whites to feel that
people around them do not care about the community any longer, even if their
perceptions are about changing policies and not changing demographics.}
Outgroups may indeed have different norms about altruism, but even if they do
not, \emph{beliefs} that outgroups differ in norms still affect political
judgments. In other words, people who perceive more outgroup members in their
communities are more likely to perceive that these outgroup members do not
share their same values and practices that promote prosocial
behavior.\footnote{\textcite{krysan2008eye} found that by simply manipulating
the race of a few individuals shown in a video clip about a neighborhood, they
could significantly change white respondents' judgments about the quality of
that neighborhood, its housing values and property upkeep, its safety, and the
quality of its schools.} These misperceptions can, in turn, diminish the
possibilities for intergroup cooperation.

Why should we care about perceptions and pseudoenvironments beyond their role
in theories of inter-group relations and the social, political and economic
consequences of diversity? Public policy can, in principle, change
pseudoenvironments more easily than objective contexts. Housing cannot be
assigned to individuals in liberal democracies (except for among special
populations, like refugees, people dependent on certain restricted government
programs, and incoming college students living in university-controlled dorms
\citep{edin2003ethnic, chetty2015effects, west2009superordinate}). However, our
results here suggest  we can try to improve intergroup relations and/or
access some of the benefits of social cohesion in general by changing
perceptions of where people live, particularly about geographies in which they
have a vested interest, like their communities. It is, of course, not an easy
task to change people's  attitudes \citep{kuklinski2000rich,
lawrence2014consequences, gladwell1995, hopkinssidescitrin}, but it is more feasible than
convincing ordinary citizens to give up autonomy over their residential
choices.\footnote{While we have been comparing individuals who perceive more
	diversity to those who perceive less, we want to stress that
	respondents within each pair whose pseudoenvironments are less diverse
	are not necessarily accurate in their perceptions. In fact, they
	overestimate the numbers of minorities in their community by 10
percentage points on average (and their counterparts overestimate by 31
percentage points on average). Everyone could benefit from greater knowledge.}
Taking into account subjective contexts has implications for how policymakers
think about diversity's effects on the provision of social goods, and on
tipping points, segregation, and white flight. From a scientific perspective,
we can apply what we know about information processing more broadly to our
understanding of geography and intergroup relations: pseudoenvironments enhance
the relevance of psychology for the study of political geography.


% from Analysis/supp_desc_new.Rout
%wdat0 %>%
%    group_by(more_diverse_pseudoenv) %>%
%    summarize(mean(perc_bias, na.rm = TRUE), mean(vm.community.subj), n())
%
%## A tibble: 2 × 4
%#  more_diverse_pseudoenv `mean(perc_bias, na.rm = TRUE)` `mean(vm.community.subj)` `n()`
%#                   <dbl>                           <dbl>                     <dbl> <int>
%# 1                      1                         -0.0954                     0.188  1886
%# 2                      2                         -0.309                      0.430  1886

